# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Compute.V1.Model.DiskAsyncReplication do
  @moduledoc """


  ## Attributes

  *   `consistencyGroupPolicy` (*type:* `String.t`, *default:* `nil`) - [Output Only] URL of the DiskConsistencyGroupPolicy if replication was started on the disk as a member of a group.
  *   `consistencyGroupPolicyId` (*type:* `String.t`, *default:* `nil`) - [Output Only] ID of the DiskConsistencyGroupPolicy if replication was started on the disk as a member of a group.
  *   `disk` (*type:* `String.t`, *default:* `nil`) - The other disk asynchronously replicated to or from the current disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: - https://www.googleapis.com/compute/v1/projects/project/zones/zone /disks/disk - projects/project/zones/zone/disks/disk - zones/zone/disks/disk 
  *   `diskId` (*type:* `String.t`, *default:* `nil`) - [Output Only] The unique ID of the other disk asynchronously replicated to or from the current disk. This value identifies the exact disk that was used to create this replication. For example, if you started replicating the persistent disk from a disk that was later deleted and recreated under the same name, the disk ID would identify the exact version of the disk that was used.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :consistencyGroupPolicy => String.t() | nil,
          :consistencyGroupPolicyId => String.t() | nil,
          :disk => String.t() | nil,
          :diskId => String.t() | nil
        }

  field(:consistencyGroupPolicy)
  field(:consistencyGroupPolicyId)
  field(:disk)
  field(:diskId)
end

defimpl Poison.Decoder, for: GoogleApi.Compute.V1.Model.DiskAsyncReplication do
  def decode(value, options) do
    GoogleApi.Compute.V1.Model.DiskAsyncReplication.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Compute.V1.Model.DiskAsyncReplication do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
